<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>

		<pre>
			1.整理今天内容,纸质
			2.上网查询如何更改placeholder的样式
			3.练习早上的案例(从数组数据渲染到页面)
		</pre>


		<table border="" cellspacing="" cellpadding="">
			<tbody>
				<tr>
					<th>ID</th>
					<th>姓名</th>
					<th>年龄</th>
					<th>性别</th>
					<th>操作</th>
				</tr>
			</tbody>
			<tfoot id="tfoot">
				<!-- <tr>
					<td>1</td>
					<td>曾田</td>
					<td>18</td>
					<td>男</td>
					<td></td>
				</tr> -->
			</tfoot>
		</table>



		<script type="text/javascript">
			var arr = [{
					id: 1,
					name: "张三",
					age: 18,
					sex: "男"
				},
				{
					id: 2,
					name: "李四",
					age: 20,
					sex: "男"
				},
				{
					id: 3,
					name: "王五",
					age: 30,
					sex: "男"
				},
				{
					id: 4,
					name: "赵六",
					age: 25,
					sex: "男"
				},
			];

			var tfoot = document.getElementById("tfoot");
			tfoot.innerHTML = "";
			// var a = "";

			for (var i = 0; i < arr.length; i++) {
				tfoot.innerHTML +=
					`
				<tr>
					<td>${arr[i].id}</td>
					<td>${arr[i].name}</td>
					<td>${arr[i].age}</td>
					<td>${arr[i].sex}</td>
					<td><button type="button" onclick="del()">删除</button></td>
				</tr>
				`
			}
		</script>
	</body>
</html>
